package com.duang.framework.dao.plugin;

import java.sql.DriverManager;
import java.sql.SQLException;

import javax.sql.DataSource;

import com.duang.framework.dao.AbstractConnectionPool;
import com.duang.framework.dao.DataSourceProvider;
import com.duang.framework.dao.Plugin;

public class DefaultImplPlugin extends AbstractConnectionPool implements
		DataSourceProvider, Plugin {

	public DefaultImplPlugin(String jdbcUrl, String user, String password,
			String driverClass) {
		super(jdbcUrl, user, password, driverClass);

	}

	public void init() {
		try {
			Class.forName(driverClass);
			DriverManager.registerDriver(null);
		} catch (ClassNotFoundException e) {
			e.printStackTrace();
		} catch (SQLException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}

	}

	@Override
	public boolean start() {
		return true;
	}

	@Override
	public boolean stop() {
		return true;
	}

	@Override
	public DataSource getDataSource() {
		return null;
	}

}
